{% extends 'templates/default_template.html' %}
{%block content%}
<h1>Area {{area.name}} #{{area.key.id}}</h1>
<h2>Responsibles</h2>
  <ul>
  {% for p in responsibles %}
    {%ifequal logged_user.key p.key%}
      <li><a href="/users/me">{{p.name}} (You)</a></li>
    {%else%}
      <li>{{p.name}}</li>
    {%endifequal%}
  {% endfor %}
  </ul>
<hr />


<h2>Area Projects</h2>
<div>
{% if projects%}
  <ul class="projectList">
  {% for project in projects%}
    <li><a href="/projects/{{project.key}}">{{project.name}}</a></li>
  {% endfor %}
  </ul>
{% else %}
<p>Area has no projects</p>
{%endif%}
<h2>Area Options</h2>
<div class="projectOptions">
  {% if can_add_projects %}
  <div class="fastOption">
    <h3>Add project to area</h3> 
    <p>It is not certain if you can add projects (yet)</p>
    <form action="/areas/{{area.key}}/add_project" method="post">
      <input type="text" name="project_name" placeholder="Enter the project name" autocomplete="off"/>
      <input type="submit" />
    </form>
  </div>
  {% endif%}
</div>
</div>
{%endblock content%}